#ifndef STATE_HPP
#define STATE_HPP
#include <matrix.hpp>
#include <transforms.hpp>
#include <fstream>
#include <rgb_to_grayscale.hpp>
namespace ohe_framework
{
//////////////////////////////////////////////////////////////
    #define START               0
    #define WIRE                1
    #define WIRE_SECOND         2
    #define MAST                3
    #define OBJECTS             4
    #define HISTORY             10
    #define RANGE_ROWS          100
    #define RANGE_COLS          100
    #define ROW_LIMIT           10
    #define COL_LIMIT           10
/////////////////////////////////////////////////////////////
    class DynamicState
    {
        public:
            double x;
            double u;
            double a;
            DynamicState();
            void reset();
    };
/////////////////////////////////////////////////////////////
    class Detection
    {
        public:
            unsigned char detection_states[HISTORY];
            unsigned char current_state;
            Detection()
            {
                resetHistory();
            }
            void resetHistory();
            void setcurrentState(unsigned char state);
            unsigned char getCurrentState();
    };
///////////////////////////////////////////////////////////// 
    
/////////////////////////////////////////////////////////////
    void getRadonTransform(ImageMatrixUchar &img, std::ofstream &file);
    void prepareRadonTransform(ImageMatrixUchar &img,Blob &upper,Blob &lower, std::ofstream &file);
    void separateContours(std::vector<Blob> &contours,
                          std::vector<std::vector<unsigned int> > &contour_index,Detection &state);
/////////////////////////////////////////////////////////////
}// end namespace ohe_framework

#endif
